Corey Farwell [Thu, 5 May 2016 22:40:47 +0000 (18:40 -0400)]
Turn `url_ref` utility function into method.
bors [Thu, 5 May 2016 02:50:09 +0000 (19:50 -0700)]
Auto merge of #2648 - frewsxcv:unused-to-url, r=alexcrichton
Remove unused `ToUrl` impls.
None
Corey Farwell [Thu, 5 May 2016 01:46:36 +0000 (21:46 -0400)]
Remove unused `ToUrl` impls.
bors [Wed, 4 May 2016 02:17:14 +0000 (19:17 -0700)]
Auto merge of #2635 - frewsxcv:toml-cleanup, r=alexcrichton
Various cleanup in `src/cargo/util/toml.rs`.
None
bors [Tue, 3 May 2016 22:11:27 +0000 (15:11 -0700)]
Auto merge of #2639 - SimonSapin:url-1.0, r=alexcrichton
Update to rust-url 1.x
This is ready to go now :)
bors [Tue, 3 May 2016 17:59:34 +0000 (10:59 -0700)]
Auto merge of #2634 - frewsxcv:flake8, r=alexcrichton
Address flake8 issues.
None
Simon Sapin [Wed, 2 Mar 2016 15:37:44 +0000 (16:37 +0100)]
Update to rust-url 1.x
bors [Tue, 3 May 2016 16:40:16 +0000 (09:40 -0700)]
Auto merge of #2636 - sanxiyn:unused-trait-import, r=alexcrichton
Remove unused trait imports
Seo Sanghyeon [Tue, 3 May 2016 16:37:19 +0000 (01:37 +0900)]
Update OpenSSL version to 1.0.2h
Seo Sanghyeon [Tue, 3 May 2016 09:21:27 +0000 (18:21 +0900)]
Remove unused trait imports
Corey Farwell [Tue, 3 May 2016 01:18:14 +0000 (21:18 -0400)]
Utilize `if let` construct over single branch `match`.
Corey Farwell [Tue, 3 May 2016 01:17:01 +0000 (21:17 -0400)]
Remove unnecessary `Vec` allocation when iterating.
Corey Farwell [Tue, 3 May 2016 01:04:26 +0000 (21:04 -0400)]
Refactor `TomlTarget` validation functions into methods.
Corey Farwell [Tue, 3 May 2016 00:59:39 +0000 (20:59 -0400)]
Use constructor pattern for `project_layout` in `toml.rs`.
Corey Farwell [Tue, 3 May 2016 00:26:41 +0000 (20:26 -0400)]
Minor whitespace fixes for flake8.
Corey Farwell [Tue, 3 May 2016 00:25:05 +0000 (20:25 -0400)]
Remove unused Python imports.
bors [Mon, 2 May 2016 16:54:56 +0000 (09:54 -0700)]
Auto merge of #2405 - gkoz:reinstall, r=alexcrichton
Add `--force` flag to cargo install
Close #2082.
Adding `--force` (`-f`) instructs cargo to overwrite existing binaries (updating the metadata accordingly).
This allows updating crates via `cargo install -f <crate>`.
Installation happens in two stages now: binaries are copied into a temporary subdirectory of the destination first, then moved into destination. This should catch some errors earlier.
In case of installation error cargo will remove new binaries but won't attempt to undo successful overwrites.
Gleb Kozyrev [Sat, 30 Apr 2016 23:46:41 +0000 (02:46 +0300)]
cargo-install: move binaries from the build dir if possible
Try moving the binaries (and fall back to copying) if the build
directory is a temporary one (source isn't a local path).
Gleb Kozyrev [Fri, 15 Apr 2016 11:20:45 +0000 (14:20 +0300)]
Add `--force` flag to cargo install
Close #2082
Adding `--force` (`-f`) instructs cargo to overwrite existing binaries
(updating the metadata accordingly).
This allows updating crates via `cargo install -f <crate>`.
Installation happens in two stages now: binaries are copied into a
temporary subdirectory of the destination first, then moved into
destination. This should catch some errors earlier.
In case of installation error cargo will remove new binaries but won't
attempt to undo successful overwrites.
bors [Sat, 30 Apr 2016 00:46:56 +0000 (17:46 -0700)]
Auto merge of #2629 - alexcrichton:moar-rustflags, r=brson
Pass RUSTFLAGS when we learn about target info
This should help us learn about `target_feature` additions!
Closes #2628
Alex Crichton [Fri, 29 Apr 2016 23:36:55 +0000 (16:36 -0700)]
Pass RUSTFLAGS when we learn about target info
This should help us learn about `target_feature` additions!
Closes #2628
bors [Fri, 29 Apr 2016 17:15:47 +0000 (10:15 -0700)]
Auto merge of #2623 - alexcrichton:nfs-lol-no, r=brson
Don't use flock on NFS mounts
Completely skip file locking when we detect an NFS mount via `statfs`.
Closes #2615
bors [Wed, 27 Apr 2016 17:00:37 +0000 (10:00 -0700)]
Auto merge of #2625 - aidanhs:aphs-path-crates-io, r=alexcrichton
`path` dependencies are ignored from crates.io
Aidan Hobson Sayers [Wed, 27 Apr 2016 14:54:58 +0000 (15:54 +0100)]
`path` dependencies are ignored from crates.io
Alex Crichton [Tue, 26 Apr 2016 22:58:49 +0000 (15:58 -0700)]
Don't use flock on NFS mounts
Completely skip file locking when we detect an NFS mount via `statfs`.
Closes #2615
bors [Tue, 26 Apr 2016 06:11:10 +0000 (23:11 -0700)]
Auto merge of #2619 - japaric:freebsd32, r=alexcrichton
prepare for i686-unknown-freebsd nightlies
Tested with:
```
$ python -B src/etc/install-deps.py
$ ./configure --local-rust-root=$PWD/rustc --enable-optimize --enable-nightly --target=i686-unknown-freebsd
$ make
```
r? @alexcrichton
Jorge Aparicio [Tue, 26 Apr 2016 05:22:30 +0000 (00:22 -0500)]
prepare for i686-unknown-freebsd nightlies
bors [Mon, 25 Apr 2016 16:17:58 +0000 (09:17 -0700)]
Auto merge of #2617 - sanxiyn:reset-rustflags, r=alexcrichton
Reset RUSTFLAGS when running tests
Seo Sanghyeon [Mon, 25 Apr 2016 13:58:09 +0000 (22:58 +0900)]
Reset RUSTFLAGS when running tests
bors [Sun, 24 Apr 2016 05:15:19 +0000 (22:15 -0700)]
Auto merge of #2610 - japaric:install-from-tempdir, r=alexcrichton
cargo-install: prefer building artifacts in the system temporary directory
and each cargo-install instance creates and uses its own build directory. This
allows running several cargo-install instances in parallel.
If we fail to create a temporary directory for whatever reason fallback to
creating and using a target-install directory in the current directory.
closes #2606
---
r? @alexcrichton
Qs:
- Should we preserve the current behavior (`target-install` in `cwd`) as a fallback or remove it and error if we can't create a `TempDir` in `env::temp_dir()`? (we currently error if we can't create `target-install` directory in `cwd`)
- Should I add tests for the issues I raised at #2606? If yes, how can I test `cargo-install` parallelism? Lack of "Blocking waiting for file lock on build directory" in the output of the `cargo` commands? or something else?
Jorge Aparicio [Sat, 23 Apr 2016 03:33:58 +0000 (22:33 -0500)]
add tests for #2606
Jorge Aparicio [Fri, 22 Apr 2016 22:49:12 +0000 (17:49 -0500)]
cargo-install: prefer building artifacts in the system temporary directory
and each cargo-install instance creates and uses its own build directory. This
allows running several cargo-install instances in parallel.
If we fail to create a temporary directory for whatever reason fallback to
creating and using a target-install directory in the current directory.
closes #2606
bors [Thu, 21 Apr 2016 18:16:01 +0000 (11:16 -0700)]
Auto merge of #2602 - durka:patch-5, r=alexcrichton
fix rerun-if-changed documentation
The documentation corresponded to the initial proposed implementation, which was changed to remove special handling of directories before it was ever merged.
closes #2599
r? @alexcrichton
Alex Burka [Thu, 21 Apr 2016 17:55:24 +0000 (13:55 -0400)]
fix rerun-if-changed documentation
The documentation corresponded to the initial proposed implementation, which was changed to remove special handling of directories before it was ever merged.
bors [Thu, 21 Apr 2016 17:40:42 +0000 (10:40 -0700)]
Auto merge of #2578 - alexcrichton:test-doc, r=brson
Add `cargo test --doc`
Supports testing only the documentation (like `--lib`, `--bin`, etc).
bors [Thu, 21 Apr 2016 17:09:27 +0000 (10:09 -0700)]
Auto merge of #2551 - alexcrichton:explain, r=brson
Add support for `cargo --explain`
The error messages in the compiler are being tweaked and will likely drop the
`rustc --explain` part of the error message in favor of `--explain`. In that
case you're expected to basically take whatever tool you're using and pass
`--explain` to it with an error code, so let's add it to Cargo as well!
Alex Crichton [Fri, 8 Apr 2016 00:27:49 +0000 (17:27 -0700)]
Add support for `cargo --explain`
The error messages in the compiler are being tweaked and will likely drop the
`rustc --explain` part of the error message in favor of `--explain`. In that
case you're expected to basically take whatever tool you're using and pass
`--explain` to it with an error code, so let's add it to Cargo as well!
bors [Thu, 21 Apr 2016 16:34:38 +0000 (09:34 -0700)]
Auto merge of #2576 - alexcrichton:silence-warnings-with-q, r=brson
Don't print warnings when -q is passed
Closes #2571
bors [Wed, 20 Apr 2016 18:51:57 +0000 (11:51 -0700)]
Auto merge of #2579 - alexcrichton:robust-submodule, r=brson
Remove submodule directory before cloning
If the directory is in a corrupt state that caused an existing repository to not
successfully open, then we'll want to blow it away anything that already exists
to ensure we start from a clean slate.
Closes #2567
bors [Wed, 20 Apr 2016 18:06:54 +0000 (11:06 -0700)]
Auto merge of #2577 - alexcrichton:doc-lib-flags, r=brson
Add `cargo doc --lib/--bin`
Allows documenting a specific target.
Closes #2557
bors [Wed, 20 Apr 2016 17:12:50 +0000 (10:12 -0700)]
Auto merge of #2560 - alexcrichton:not-all-utf8, r=brson
Don't require all build script output to be utf-8
Build scripts often stream output of native build systems like cmake/make and
those aren't always guaranteed to produce utf-8 output. For example German
MSVC cmake build has been reported to print non-utf-8 umlauts.
This commit instead only attempts to interpret each line as utf-8 rather than
the entire build script output. All non-utf-8 output is ignored.
Closes #2556
bors [Wed, 20 Apr 2016 16:09:52 +0000 (09:09 -0700)]
Auto merge of #2501 - ryanq:issue2266, r=alexcrichton
Check local targets before resolving dependencies
A call to `generate_targets(...)` before calling `resolve_dependencies()`
catches invalid target names before fetching the source for the
dependencies.
Closes #2266
bors [Tue, 19 Apr 2016 22:32:11 +0000 (15:32 -0700)]
Auto merge of #2592 - jethrogb:topic/list-symlinks, r=alexcrichton
Use stat() instead of lstat() in cargo --list
The OS-specific implementation is necessary because according to the docs, [DirEntry::metadata is fast on Windows](https://doc.rust-lang.org/stable/std/fs/struct.DirEntry.html#method.metadata). Note `is_executable` is used elsewhere so we can't change that directly to accept `DirEntry` instead of `Metadata`.
Fixes #2591
Jethro Beekman [Tue, 19 Apr 2016 20:55:37 +0000 (13:55 -0700)]
Fix dead code lints on Windows
Jethro Beekman [Tue, 19 Apr 2016 19:19:51 +0000 (12:19 -0700)]
Style issue
Jethro Beekman [Tue, 19 Apr 2016 19:00:30 +0000 (12:00 -0700)]
Add test list_command_resolves_symlinks
Jethro Beekman [Tue, 19 Apr 2016 18:59:55 +0000 (11:59 -0700)]
Tests: fix grammar and extra semicolon
Jethro Beekman [Tue, 19 Apr 2016 18:59:25 +0000 (11:59 -0700)]
Style issue
bors [Tue, 19 Apr 2016 18:46:40 +0000 (11:46 -0700)]
Auto merge of #2590 - alexcrichton:dont-warn-about-flags-and-configs, r=brson
Have CLI take preference over config for verbosity
If a CLI option is passed, that trumps any command line configuration, otherwise
just do what we did previously.
Closes #2588
Jethro Beekman [Tue, 19 Apr 2016 00:05:06 +0000 (17:05 -0700)]
Use stat() instead of lstat() in cargo --list. Fixes #2591
Alex Crichton [Mon, 18 Apr 2016 05:02:44 +0000 (22:02 -0700)]
Have CLI take preference over config for verbosity
If a CLI option is passed, that trumps any command line configuration, otherwise
just do what we did previously.
Closes #2588
bors [Mon, 18 Apr 2016 04:53:11 +0000 (21:53 -0700)]
Auto merge of #2584 - alexcrichton:auth-more, r=brson
Correctly attempt multiple usernames with libgit2
This commit corrects the logic for attempting multiple usernames with libgit2.
There is a restriction that for each authentication seession you can only
authenticate with one ssh username, but we were attempting multiple as part of
the same sesssion. Instead restart authentication whenever we try a new username.
Closes #2399
Alex Crichton [Sat, 16 Apr 2016 00:45:30 +0000 (17:45 -0700)]
Correctly attempt multiple usernames with libgit2
This commit corrects the logic for attempting multiple usernames with libgit2.
There is a restriction that for each authentication seession you can only
authenticate with one ssh username, but we were attempting multiple as part of
the same sesssion. Instead restart authentication whenever we try a new username.
Closes #2399
Alex Crichton [Sun, 17 Apr 2016 16:41:46 +0000 (09:41 -0700)]
Merge pull request #2587 from birkenfeld/docmenu
Doc dropdown menu: name "Cargo.toml" explicitly
Georg Brandl [Sun, 17 Apr 2016 06:18:55 +0000 (08:18 +0200)]
Doc dropdown menu: name "Cargo.toml" explicitly
Alex Crichton [Thu, 14 Apr 2016 17:37:16 +0000 (10:37 -0700)]
Add `cargo test --doc`
Supports testing only the documentation (like `--lib`, `--bin`, etc).
Alex Crichton [Thu, 14 Apr 2016 17:32:35 +0000 (10:32 -0700)]
Add `cargo doc --lib/--bin`
Allows documenting a specific target.
Closes #2557
Alex Crichton [Thu, 14 Apr 2016 17:40:36 +0000 (10:40 -0700)]
Remove submodule directory before cloning
If the directory is in a corrupt state that caused an existing repository to not
successfully open, then we'll want to blow it away anything that already exists
to ensure we start from a clean slate.
Closes #2567
bors [Thu, 14 Apr 2016 17:36:06 +0000 (10:36 -0700)]
Auto merge of #2575 - alexcrichton:bump, r=alexcrichton
Bump to 0.11.0
Alex Crichton [Thu, 14 Apr 2016 17:25:25 +0000 (10:25 -0700)]
Don't print warnings when -q is passed
Closes #2571
Alex Crichton [Thu, 14 Apr 2016 17:10:02 +0000 (10:10 -0700)]
Bump to 0.11.0
bors [Thu, 14 Apr 2016 17:05:05 +0000 (10:05 -0700)]
Auto merge of #2574 - alexcrichton:crates-io-bump, r=alexcrichton
Bump the crates-io crate to 0.2
Alex Crichton [Thu, 14 Apr 2016 17:04:23 +0000 (10:04 -0700)]
Bump the crates-io crate to 0.2
bors [Tue, 12 Apr 2016 15:14:33 +0000 (08:14 -0700)]
Auto merge of #2562 - smaximov:doc-add-env-vars, r=alexcrichton
Document env vars introduced in PR #2523 to the docs
Document environment variables introduced in #2523 (`CARGO_PKG_NAME`, `CARGO_PKG_DESCRIPTION`, `CARGO_PKG_HOMEPAGE`).
smaximov [Tue, 12 Apr 2016 10:32:11 +0000 (20:32 +1000)]
Add reference to env vars introduced in PR #2523 to the docs
bors [Mon, 11 Apr 2016 20:40:12 +0000 (13:40 -0700)]
Auto merge of #2561 - alexcrichton:update-tar, r=alexcrichton
Update dependency on tar
Includes a fix for alexcrichton/tar-rs#61
Alex Crichton [Mon, 11 Apr 2016 19:55:38 +0000 (12:55 -0700)]
Update dependency on tar
Includes a fix for alexcrichton/tar-rs#61
Alex Crichton [Mon, 11 Apr 2016 17:06:47 +0000 (10:06 -0700)]
Don't require all build script output to be utf-8
Build scripts often stream output of native build systems like cmake/make and
those aren't always guaranteed to produce utf-8 output. For example German
MSVC cmake build has been reported to print non-utf-8 umlauts.
This commit instead only attempts to interpret each line as utf-8 rather than
the entire build script output. All non-utf-8 output is ignored.
Closes #2556
bors [Fri, 8 Apr 2016 20:31:50 +0000 (13:31 -0700)]
Auto merge of #2554 - alexcrichton:robust-test, r=alexcrichton
Make a test a bit more robust to the environment
Don't filter out PATH as `rustc` may be in that directory (e.g. when using
rustup) and otherwise just have a longer subcommand.
Closes #2553
Alex Crichton [Fri, 8 Apr 2016 20:30:45 +0000 (13:30 -0700)]
Make a test a bit more robust to the environment
Don't filter out PATH as `rustc` may be in that directory (e.g. when using
rustup) and otherwise just have a longer subcommand.
Closes #2553
bors [Fri, 8 Apr 2016 18:53:24 +0000 (11:53 -0700)]
Auto merge of #2465 - TheNeikos:add-version_env, r=alexcrichton
Add a new CARGO_PKG_AUTHORS environment variable
This will allow crates to use the CARGO_PKG_AUTHORS env variable to get a comma
seperated list of the authors declared in the manifest.
Closes #2441
Marcel Müller [Thu, 10 Mar 2016 09:35:50 +0000 (10:35 +0100)]
Add a new CARGO_PKG_AUTHORS environment variable
This will allow crates to use the CARGO_PKG_AUTHORS env variable to get a colon
seperated list of the authors declared in the manifest.
Closes #2441
Ryan Quattlebaum [Fri, 8 Apr 2016 16:57:34 +0000 (12:57 -0400)]
Merge remote-tracking branch 'origin/master' into issue2266
Ryan Quattlebaum [Fri, 8 Apr 2016 16:55:02 +0000 (12:55 -0400)]
Only validate targets if the spec option is empty
bors [Thu, 7 Apr 2016 21:17:56 +0000 (14:17 -0700)]
Auto merge of #2385 - alexcrichton:top-level-overrides, r=wycats
Implement top-level overrides
This commit is an implementation of top-level overrides to be encoded into the
manifest itself directly. This style of override is distinct from the existing
`paths` support in `.cargo/config` in two important ways:
* Top level overrides are intended to be checked in and shared amongst all
developers of a project.
* Top level overrides are reflected in `Cargo.lock`.
The second point is crucially important here as it will ensure that an override
on one machine behaves the same as an override on another machine. This solves
many long-standing problems with `paths`-based overrides which suffer from some
level of nondeterminism as they're not encoded.
From a syntactical point of view, an override looks like:
```toml
[replace]
"libc:0.2.0" = { git = 'https://github.com/my-username/libc';, branch = '0.2-fork' }
```
This declaration indicates that whenever resolution would otherwise encounter
the `libc` package version 0.2.0 from crates.io, it should instead replace it
with the custom git dependency on a specific branch.
The key "libc:0.2.0" here is actually a package id specification which will
allow selecting various components of a graph. For example the same named
package coming from two distinct locations can be selected against, as well as
multiple versions of one crate in a dependency graph. The replacement dependency
has the same syntax as the `[dependencies]` section of Cargo.toml.
One of the major uses of this syntax will be, for example, using a temporary
fork of a crate while the changes are pushed upstream to the original repo. This
will avoid the need to change the intermediate projects immediately, and over
time once fixes have landed upstream the `[replace]` section in a `Cargo.toml`
can be removed.
There are also two crucial restrictions on overrides.
* A crate with the name `foo` can only get overridden with packages also of
the name `foo`.
* A crate can only get overridden with a crate of the exact same version.
A consequence of these restrictions is that crates.io cannot be used to replace
anything from crates.io. There's only one version of something on crates.io, so
there's nothing else to replace it with (name/version are a unique key).
Closes #942
bors [Wed, 6 Apr 2016 16:56:36 +0000 (09:56 -0700)]
Auto merge of #2547 - alexcrichton:more-locking, r=brson
Add file locks in a few more locations
One was discovered by making `target_dir` return a `Filesystem`, the other was discovered by failing tests on the nightly OSX bots.
Alex Crichton [Tue, 5 Apr 2016 23:32:13 +0000 (16:32 -0700)]
Protect against concurrent access to Cargo.lock
CI tests seen to be spurious failing on OSX due to this, I believe it's because
one process is concurrently writing out Cargo.lock while the other is trying to
read it in, so one of them gets a corrupt version.
This would ideally be fixed from `pkg.root()` returning a `Filesystem`, but that
was unfortunately such an invasive change that it seemed untenable. Additionally
we generally don't write files into the source tree, so if this is the only
instance it's perhaps not so bad trying to be robust in to the future.
Alex Crichton [Sat, 2 Apr 2016 01:06:20 +0000 (18:06 -0700)]
Change `Config::target_dir` to return Filesystem
This is a shared directory among multiple Cargo processes so access to it needs
to be properly synchronized. This commit changes the API of `Config::target_dir`
and then propagates the changes outward as necessary.
One fallout of this change is now we allow release/debug builds to proceed in
parallel.
bors [Sun, 3 Apr 2016 01:17:51 +0000 (18:17 -0700)]
Auto merge of #2541 - alexcrichton:aarch64, r=alexcrichton
Download the aarch64 standard library on the bots
Alex Crichton [Sat, 2 Apr 2016 01:08:21 +0000 (18:08 -0700)]
Download the aarch64 standard library on the bots
bors [Sat, 2 Apr 2016 23:26:03 +0000 (16:26 -0700)]
Auto merge of #2534 - alexcrichton:lock-with-git-repos, r=brson
Replace existing sources before updating
Currently sources may acquire file locks to ensure that they're not tampered
with while they're in use. We may load two sources to the same location,
however, in the case of git repositories which need to be updated. Cargo will
first load a locked version of the source and then may load an unlocked version,
and these two loads currently deadlock.
This commit tweaks the logic when updating a source to only update it after the
previous source has been replaced.
Closes #2533
bors [Sat, 2 Apr 2016 01:13:23 +0000 (18:13 -0700)]
Auto merge of #2538 - alexcrichton:aarch64, r=alexcrichton
Prepare for aarch64 nightlies and CI
Alex Crichton [Sat, 2 Apr 2016 01:08:21 +0000 (18:08 -0700)]
Prepare for aarch64 nightlies and CI
bors [Fri, 1 Apr 2016 17:56:49 +0000 (10:56 -0700)]
Auto merge of #2505 - srinivasreddy:improve_msg, r=alexcrichton
Create `Cargo.lock` if it does not exist.
Srinivas Reddy Thatiparthy [Thu, 31 Mar 2016 17:32:14 +0000 (23:02 +0530)]
remote unnecessary expression
bors [Thu, 31 Mar 2016 16:37:48 +0000 (09:37 -0700)]
Auto merge of #2491 - JIghtuse:master, r=alexcrichton
Reject manifest with duplicate dependencies in different targets
Closes #2023
srinivasreddy [Sun, 20 Mar 2016 20:12:52 +0000 (01:42 +0530)]
Generate the lock file when there is no lock file
Alex Crichton [Wed, 30 Mar 2016 17:39:24 +0000 (10:39 -0700)]
Replace existing sources before updating
Currently sources may acquire file locks to ensure that they're not tampered
with while they're in use. We may load two sources to the same location,
however, in the case of git repositories which need to be updated. Cargo will
first load a locked version of the source and then may load an unlocked version,
and these two loads currently deadlock.
This commit tweaks the logic when updating a source to only update it after the
previous source has been replaced.
Closes #2533
bors [Wed, 30 Mar 2016 16:11:39 +0000 (09:11 -0700)]
Auto merge of #2532 - japaric:musl, r=alexcrichton
install-deps.py: add x86_64-unknown-linux-musl target
This lets me build a statically linked cargo on our linux-cross Docker image with the following
commands:
$ apt-get install musl-tools # for musl-gcc, which is needed to build openssl
$ ./.travis.install.deps.sh
$ ./configure --local-rust-root=$(pwd)/rustc --enable-nightly --target=x86_64-unknown-linux-musl
$ make
$ file target/x86_64-unknown-linux-musl/release/cargo
cargo: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked (..)
---
r? @alexcrichton -- If we want start building cargo for this target on the bots, we'll have to modify the linux-cross Dockerfile to install musl-tools.
cc @eddyb
bors [Wed, 30 Mar 2016 00:43:41 +0000 (17:43 -0700)]
Auto merge of #2531 - alexcrichton:fix-stdin, r=alexcrichton
Update Rust to pick up rust-lang/rust#32257
Closes #2530
Alex Crichton [Wed, 30 Mar 2016 00:41:18 +0000 (17:41 -0700)]
Update Rust to pick up rust-lang/rust#32257
Closes #2530
Jorge Aparicio [Wed, 30 Mar 2016 00:38:13 +0000 (19:38 -0500)]
install-deps.py: add x86_64-unknown-linux-musl target
This lets me build a statically linked cargo on our linux-cross Docker image with the following
commands:
$ apt-get install musl-tools # for musl-gcc, which is needed to build openssl
$ ./.travis.install.deps.sh
$ ./configure --local-rust-root=$(pwd)/rustc --enable-nightly --target=x86_64-unknown-linux-musl
$ make
$ file target/x86_64-unknown-linux-musl/release/cargo
cargo: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked (..)
bors [Tue, 29 Mar 2016 16:48:28 +0000 (09:48 -0700)]
Auto merge of #2523 - srinivasreddy:issue-2504, r=alexcrichton
expose cargo package name as CARGO_PKG_NAME
srinivasreddy [Sat, 26 Mar 2016 20:00:26 +0000 (01:30 +0530)]
implemented cargo package name as CARGO_PKG_NAME; And package description and home page are exposed as CARGO_PKG_DESCRIPTION and CARGO_PKG_HOMEPAGE respectively. And add a test case - for CARGO_PKG_NAME, CARGO_PKR_DESCRIPTION, CARGO_HOMEPAGE.
Alex Crichton [Tue, 9 Feb 2016 23:42:17 +0000 (15:42 -0800)]
Implement top-level overrides
This commit is an implementation of top-level overrides to be encoded into the
manifest itself directly. This style of override is distinct from the existing
`paths` support in `.cargo/config` in two important ways:
* Top level overrides are intended to be checked in and shared amongst all
developers of a project.
* Top level overrides are reflected in `Cargo.lock`.
The second point is crucially important here as it will ensure that an override
on one machine behaves the same as an override on another machine. This solves
many long-standing problems with `paths`-based overrides which suffer from some
level of nondeterminism as they're not encoded.
From a syntactical point of view, an override looks like:
```toml
[replace]
"libc:0.2.0" = { git = 'https://github.com/my-username/libc', branch = '0.2-fork' }
```
This declaration indicates that whenever resolution would otherwise encounter
the `libc` package version 0.2.0 from crates.io, it should instead replace it
with the custom git dependency on a specific branch.
The key "libc:0.2.0" here is actually a package id specification which will
allow selecting various components of a graph. For example the same named
package coming from two distinct locations can be selected against, as well as
multiple versions of one crate in a dependency graph. The replacement dependency
has the same syntax as the `[dependencies]` section of Cargo.toml.
One of the major uses of this syntax will be, for example, using a temporary
fork of a crate while the changes are pushed upstream to the original repo. This
will avoid the need to change the intermediate projects immediately, and over
time once fixes have landed upstream the `[replace]` section in a `Cargo.toml`
can be removed.
There are also two crucial restrictions on overrides.
* A crate with the name `foo` can only get overridden with packages also of
the name `foo`.
* A crate can only get overridden with a crate of the exact same version.
A consequence of these restrictions is that crates.io cannot be used to replace
anything from crates.io. There's only one version of something on crates.io, so
there's nothing else to replace it with (name/version are a unique key).
Closes #942
bors [Fri, 25 Mar 2016 16:26:34 +0000 (09:26 -0700)]
Auto merge of #2519 - alexcrichton:update-curl, r=alexcrichton
Update curl-sys
Picks up a fix to hopefully and correctly configure OpenSSL to be enabled in
cross-compiled situations where OpenSSL comes from a different location
(currently specified by the `OPENSSL_ROOT_DIR` environment variable that libssh2
also reads).
Alex Crichton [Fri, 25 Mar 2016 16:24:35 +0000 (09:24 -0700)]
Update curl-sys
Picks up a fix to hopefully and correctly configure OpenSSL to be enabled in
cross-compiled situations where OpenSSL comes from a different location
(currently specified by the `OPENSSL_ROOT_DIR` environment variable that libssh2
also reads).
bors [Thu, 24 Mar 2016 16:15:04 +0000 (09:15 -0700)]
Auto merge of #2513 - alexcrichton:xcompile, r=alexcrichton
Fix nightly dist builds
* When downloading rustc, also download a number of cross-std libraries so we
can cross compile with that compiler.
* Only build OpenSSL on some --enable-nightly builds, not all. For example
Windows and OSX don't want to link statically to OpenSSL.
Alex Crichton [Thu, 24 Mar 2016 01:07:19 +0000 (18:07 -0700)]
Fix nightly dist builds
* When downloading rustc, also download a number of cross-std libraries so we
can cross compile with that compiler.
* Only build OpenSSL on some --enable-nightly builds, not all. For example
Windows and OSX don't want to link statically to OpenSSL.
bors [Wed, 23 Mar 2016 16:36:36 +0000 (09:36 -0700)]
Auto merge of #2510 - alexcrichton:xcompile, r=brson
Prepare for ARM/FreeBSD/NetBSD nightlies
This commit beefs up Cargo's makefiles to support nightly builds of Cargo for
multiple platforms. This primarily involves vendoring the logic of how to build
OpenSSL for statically linking against Cargo into the Makefiles directly. We'll
have to update the version of OpenSSL as releases are made, but we essentially
already do that with the normal docker container.
The Linux nightlies will still run in the normal dist docker container (a really
old CentOS build) and builds for new platforms will happen in the standard
linux-cross container we use for other cross builds. The nightly versions of
these will produce Cargo tarballs for a whole bunch of platforms to get
uploaded.
This has been tested in the `alexcrichton/rust-slave-linux-cross:2016-03-17b`
docker container for the 3 ARM targets and FreeBSD target. NetBSD will come once
rust-lang/rust#32407 lands.